package com.example.administrator.kotlintutorial

import com.example.administrator.kotlintutorial.extenction.getExt
import java.io.File

/**
 * Created by chensuilun on 2019/2/20.
 */

fun main(args: Array<String>) {
    println("Hello Kotlin")
    var nullAllow: String? = null
    val notNull: String = "Hello"
    printLen(notNull)
    printLenNullable(nullAllow)

    Utils.echo("HelloWorld")
    echo("HelloWorld2")

    SingleTon.sayHello(null)

    val f = File("text")
    f.getExt()

}


fun printLen(str: String): String {
    println("length ${str.length}")
    return str
}

fun printLenNullable(str: String?): String? {
    println("lenght nullable ${str?.length}")
    return str
}